package com.fqgj.xjd.user.integration.ocr.adapter;

import com.alibaba.fastjson.annotation.JSONField;
import com.fqgj.xjd.user.client.response.OcrPassportFront;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapter;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapterBean;

/**
 * ·
 *
 * @author liuming
 * Created on 上午11:35 2019/1/3.
 */
public class PassportFrontAdapter extends BasicAdapter<OcrPassportFront> {

    @JSONField(name = "passport_num")
    private BasicAdapterBean passportNum;

    @JSONField(name = "surname")
    private BasicAdapterBean surname;

    @JSONField(name = "dob")
    private BasicAdapterBean dob;

    @JSONField(name = "gender")
    private BasicAdapterBean gender;

    @JSONField(name = "doe")
    private BasicAdapterBean doe;

    @JSONField(name = "doi")
    private BasicAdapterBean doi;

    @JSONField(name = "given_name")
    private BasicAdapterBean givenName;

    @JSONField(name = "country_code")
    private BasicAdapterBean countryCode;

    @JSONField(name = "place_of_birth")
    private BasicAdapterBean placeOfBirth;

    @JSONField(name = "place_of_issue")
    private BasicAdapterBean placeOfIssue;

    @JSONField(name = "nationality")
    private BasicAdapterBean nationality;

    @JSONField(name = "type")
    private BasicAdapterBean type;

    public BasicAdapterBean getPassportNum() {
        return passportNum;
    }

    public PassportFrontAdapter setPassportNum(BasicAdapterBean passportNum) {
        this.passportNum = passportNum;
        return this;
    }

    public BasicAdapterBean getSurname() {
        return surname;
    }

    public PassportFrontAdapter setSurname(BasicAdapterBean surname) {
        this.surname = surname;
        return this;
    }

    public BasicAdapterBean getDob() {
        return dob;
    }

    public PassportFrontAdapter setDob(BasicAdapterBean dob) {
        this.dob = dob;
        return this;
    }

    public BasicAdapterBean getGender() {
        return gender;
    }

    public PassportFrontAdapter setGender(BasicAdapterBean gender) {
        this.gender = gender;
        return this;
    }

    public BasicAdapterBean getDoe() {
        return doe;
    }

    public PassportFrontAdapter setDoe(BasicAdapterBean doe) {
        this.doe = doe;
        return this;
    }

    public BasicAdapterBean getDoi() {
        return doi;
    }

    public PassportFrontAdapter setDoi(BasicAdapterBean doi) {
        this.doi = doi;
        return this;
    }

    public BasicAdapterBean getGivenName() {
        return givenName;
    }

    public PassportFrontAdapter setGivenName(BasicAdapterBean givenName) {
        this.givenName = givenName;
        return this;
    }

    public BasicAdapterBean getCountryCode() {
        return countryCode;
    }

    public PassportFrontAdapter setCountryCode(BasicAdapterBean countryCode) {
        this.countryCode = countryCode;
        return this;
    }

    public BasicAdapterBean getPlaceOfBirth() {
        return placeOfBirth;
    }

    public PassportFrontAdapter setPlaceOfBirth(BasicAdapterBean placeOfBirth) {
        this.placeOfBirth = placeOfBirth;
        return this;
    }

    public BasicAdapterBean getPlaceOfIssue() {
        return placeOfIssue;
    }

    public PassportFrontAdapter setPlaceOfIssue(BasicAdapterBean placeOfIssue) {
        this.placeOfIssue = placeOfIssue;
        return this;
    }

    public BasicAdapterBean getNationality() {
        return nationality;
    }

    public PassportFrontAdapter setNationality(BasicAdapterBean nationality) {
        this.nationality = nationality;
        return this;
    }

    public BasicAdapterBean getType() {
        return type;
    }

    public PassportFrontAdapter setType(BasicAdapterBean type) {
        this.type = type;
        return this;
    }

    @Override
    public OcrPassportFront doAdapter() {
        OcrPassportFront ocrPassportFront = new OcrPassportFront();
        ocrPassportFront.setCountryCode(this.countryCode.getValue());
        ocrPassportFront.setDob(this.dob.getValue());
        ocrPassportFront.setDoe(this.doe.getValue());
        ocrPassportFront.setDoi(this.doi.getValue());
        ocrPassportFront.setGender(this.gender.getValue());
        ocrPassportFront.setGivenName(this.givenName.getValue());
        ocrPassportFront.setNationality(this.nationality.getValue());
        ocrPassportFront.setPassportNum(this.passportNum.getValue());
        ocrPassportFront.setPlaceOfBirth(this.placeOfBirth.getValue());
        ocrPassportFront.setPlaceOfIssue(this.placeOfIssue.getValue());
        ocrPassportFront.setSurname(this.surname.getValue());
        ocrPassportFront.setType(this.type.getValue());
        return ocrPassportFront;
    }
}
